Skip to main content

About packages.yml context

The following context methods and variables are available when configuring a packages.yml file.

Available context methods:

  • env_var
    • Use env_var() in any dbt YAML file that supports Jinja. Only packages.yml and profiles.yml support environment variables for secure values (using the DBT_ENV_SECRET_ prefix).
  • var (Note: only variables defined with --vars are available. Refer to YAML tips for more information)

Available context variables:

packages:
- package: dbt-labs/dbt_utils
version: "{% if builtins is defined %}0.14.0{% else %}0.13.1{% endif %}"

packages:
- package: dbt-labs/dbt_utils
version: "{% if dbt_version is defined %}0.14.0{% else %}0.13.1{% endif %}"


packages:
- package: dbt-labs/dbt_utils
version: "{% if env_var('DBT_ENV_NAME') == 'prod' %}0.14.0{% else %}0.13.1{% endif %}"

Was this page helpful?

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

0
Loading